package shujia.day12.ketang;

import java.io.File;

/*
    判断功能
        public boolean isDirectory()
        public boolean isFile()
        public boolean exists()
        public boolean canRead()
        public boolean canWrite()
        public boolean isHidden()

 */
public class FileDemo3 {
    public static void main(String[] args) {
        File file = new File("src/shujia/day12/ketang/张成阳.txt");

        //public boolean isDirectory() 判断目标是否是一个文件夹
        System.out.println(file.isDirectory());

        // public boolean isFile() 判断目标是否是一个文件
        System.out.println(file.isFile());

        // public boolean exists() 判断目标是否存在
        System.out.println(file.exists());

        // public boolean canRead() 判断目标是否可读
        System.out.println(file.canRead());
        System.out.println(file.canWrite());
        // public boolean isHidden() 判断目标是否被隐藏
        System.out.println(file.isHidden());

    }
}
